import pytest
import logging

# logging.basicConfig(level=logging.INFO)

# @pytest.hookimpl(hookwrapper=True, tryfirst=True)
# def pytest_runtest_makereport(item,call):
#     out = yield
#     res = out.get_result()
#     if res.when == 'call':
#         logging.info(f'用例ID:{res.nodeid}')
#         logging.info(f'测试结果:{res.outcome}')
#         logging.info(f'故障表示:{res.longrepr}')
#         logging.info(f'异常:{call.excinfo}')
#         logging.info(f'用例耗时:{res.duration}')
#         logging.info("****************************")